package com.newland.starpos.partner.controller;

import com.newland.starpos.partner.exception.CustomException;
import com.newland.starpos.partner.http.ResponseModel;
import com.newland.starpos.partner.service.AuthCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/authcode")
public class AuthCodeController {

    @Autowired
    private AuthCodeService authCodeService;

    @GetMapping(value = "/send/code")
    public ResponseModel sendAuthCode(String phoneNumber, int type) throws CustomException {

        return authCodeService.sendAuthCode(phoneNumber, type);
    }
}

